// app/controller/home.js
const Controller = require('../core/base_controller');

class RankController extends Controller {
  async getRanking() {
    const detail = await this.app.mysql.select('t_broker_user', { // 搜索 t_broker_user 表
        columns: ['b_avatar', 'b_nickname','b_phone','b_id'], // 要查询的表字段
        orders: ['sales_volume'], // 排序方式
      });
      console.log(11111);
    this.ctx.body = {
      meta:{
        msg:"获取成功",
        status:200,
      },
      data:{
        list:detail,
      }
    };
  }
  
}

module.exports = RankController;